<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>商品列表</title>
	<link rel="stylesheet" type="text/css" href="./Public/Home/css/list.css"/>
    <script type="text/javascript" src="Public/uploadify/jquery-1.8.2.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="./Public/Home/js/style.js"></script>
</head>
<body>	
	<!--载入公共模板-->
	{{include file="../Common/header"}}

<!--current information-->
<div class="now_loc">
	您当前的位置：  
		<a href="">{{$topCate['cname']}}</a>	
		{{foreach from="$sameType" key="$k" value="$v"}}
			<?php
				$temp = $param;
				//选择不限时 赋予值为0
				$temp[$k] = 0; 
			?>	
			{{if value="$param[$k] != 0"}}
			{{foreach from="$v['value']" value="$vv"}}
					<?php
						$temp[$k] = $vv['gaid']; 
					?>
					{{if value="$vv['gaid'] == $param[$k]"}}
					» <a href="">{{$vv['gvalue']}}</a>
				{{endif}}
				{{endforeach}}	
			{{endif}}
		{{endforeach}}	
			
</div>
<div class="bar_count">

	<p>{{$topCate['cname']}}</p>
	{{if value="isset($goodsCount)"}}
	(共有 <span>{{$goodsCount}}</span> 件商品)
	{{else if}}
	(共有 <span>0</span> 件商品)
	{{endif}}
</div>
<!--end current information-->

<!--filter-->
<nav id="filter_box">
	<div class="filter_select">
		<div class="filter_select_cont">
		 您已选择： 	
		{{foreach from="$sameType" key="$k" value="$v"}}
			<?php
				$temp = $param;
				//选择不限时 赋予值为0
				$temp[$k] = 0; 
			?>
			{{if value="$param[$k] != 0"}}
			<a href="{{U('List/index',['cid'=>$_GET['cid'],'param'=>implode('_',$temp)])}}">
				{{foreach from="$v['value']" value="$vv"}}
					<?php
						$temp[$k] = $vv['gaid']; 
					?>
					{{if value="$vv['gaid'] == $param[$k]"}}				
					<h5>{{$v['name']}}:</h5><span>{{$vv['gvalue']}}</span><i></i></a>	
					{{endif}}
				{{endforeach}}	
			{{endif}}
		{{endforeach}}	
		</div>
	</div>
	
	<div class="select_chose">	
		{{foreach from="$sameType" key="$k" value="$v"}}
		<?php
			$temp = $param;
			//选择不限时 赋予值为0
			$temp[$k] = 0; 
		?>
			<div class="select_cont_L">
				<h5>{{$v['name']}}：</h5>
			</div>		
			<ul class="select_cont">
				<!--选择不限-->
				<li><a href="{{U('List/index',['cid'=>$_GET['cid'],'param'=>implode('_',$temp)])}}"{{if value="$param[$k] == 0"}}class="ahover"{{endif}}>不限</a></li>
				<!--遍历类型属性-->
				{{foreach from="$v['value']" value="$vv"}}
				<?php
					$temp[$k] = $vv['gaid']; 
				?>
					<li><a href="{{U('List/index',['cid'=>$_GET['cid'],'param'=>implode('_',$temp)])}}"{{if value="$vv['gaid'] == $param[$k]"}}class="ahover"{{endif}}>{{$vv['gvalue']}}<span></span></a></li>		
				{{endforeach}}
				
			</ul>
			<div class="select_row"></div>	
		{{endforeach}}
		
		
	</div>
	
</nav>
<!--endfilter-->

<!--排序-->
<!--<div class="desc_page">
	<span>排序方式：</span>
	<a href="">价格</a>
	<a href="">销量</a>
</div>-->

<!--products_list-->	
<nav class="products">
	<ul>
		<!--商品-->
		{{if value="isset($goodsData)"}}
			<!--若所选商品存在-->
			{{foreach from="$goodsData" value="$v"}}	
			<li>
				<a href="{{U('Product/index',['gid'=>$v['gid'],'cid'=>$_GET['cid']])}}">
					<img src="{{$v['pic']}}" alt="" />
					<div class="products_info">
						<p class="price">￥{{$v['marketPrice']}} <del>¥{{$v['mallPrice']}}</del></p>
						<p class="info">{{$v['gname']}}</p>
						<!--<p class="sell">
						已售出
						<span>10</span>
						件-->
						</p>
							<p class="sell">
						浏览次数
						<span>{{$v['times']}}</span>
						次
						</p>
					</div>
				</a>
			</li>
			{{endforeach}}

		{{else if}}
		<div class="tip"><h4>对不起，没有符合条件的商品！</h4></div>
		{{endif}}
			
	</ul>
</nav>
<!--end products_list-->

<div class="list_page">
	<!--<ul>
		<li><a class="prev" href="">上一页</a></li>


		<li>
			<a style="background: none repeat scroll 0 0 #666666;border-color: #666666;color: #FFFFFF;" href="">1</a>
		</li>
		
		<li><a href="">2</a></li>		
		<li><a href="">3</a></li>		
		<li><a href="">4</a></li>
		<li><a class="next" href="">下一页</a></li>

	</ul>				-->
</div>

<!--回到首页-->
<a class="warp" href="{{U('Index/index')}}"><img src="./Public/Home/images/Home.png"/></a>


<!--载入公共模板-->
{{include file="../Common/footer"}}